package com.primary.mappers;

import com.primary.controller.request.DistributeRequest;
import com.primary.entity.Distribute;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface DistributeMapper {
    /**
     * 用于分页显示信息
     * @param distributeRequest
     */
    List<Map<String, Object>> listByPage(DistributeRequest distributeRequest);

    /**
     * 插入一条数据
     * @param distribute
     * @return
     */
    int insertOne(Distribute distribute);

    /**
     * 更新一条数据
     * @param distribute
     * @return
     */
    int updateOneById(Distribute distribute);

    /**
     * 删除一条记录
     * @param id
     * @return
     */
    int deleteById(Integer id);
}
